<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
ceshi

<script src="./lib/jquery-3.6.1.min.js"></script>
</script>
<script>
    $.ajax({
        url:'TestServlet',
        type:'post',
        // 传的参数
        data:{
            page:'ceshi',
            username:'李四'
        },

        success: function(res){
            console.log('请求成功')
            console.log('响应数据res=',res)
        },
        error: function(){
            console.log('请求失败')
        }
    })
</script>
</body>
</html>